package com.yeyi.ytest;

/**
 * 测试数组
 * 
 * @author: yeyi
 * @date: 2019年10月24日
 */
public class Arraycopy {
	static void t_size() {
		String[] accounts = {"22","333"};
		String[] front = new String[10];
		System.arraycopy(accounts, 0, front, 0, 10);
		System.out.println(front);
	}
	
	public static void main(String[] args) {
		t_size();
	}
}
//运行报异常
//Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
//at java.util.ArrayList.rangeCheck(Unknown Source)
//at java.util.ArrayList.get(Unknown Source)
//at com.yeyi.ytest.ArrayListTest.main(ArrayListTest.java:9)